#lang racket
(define-struct Student (last first teacher))

(define (Teacher student)
  (Student-teacher student)
  )

(define (LastName student)
  (Student-last student)
  )

(define (FirstName student)
  (Student-first student)
  )

(define (subst-teacher student teacher)
   (cond
     [(symbol=? (Teacher student) 'Fritz)
               (make-Student (LastName student) (FirstName student) teacher)]
     [else student])
     
  )

(define a-student (make-Student 'Li 'Andy 'Wendy))
(define b-student (make-Student 'Li 'Okay 'Fritz))

(LastName a-student)
(FirstName a-student)
(Teacher a-student)

(LastName b-student)
(FirstName b-student)
(Teacher b-student)

(define c-student (subst-teacher a-student 'Python))
(define d-student (subst-teacher b-student 'Python))

(Teacher c-student)
(Teacher d-student)